{% extends "base.html" %}
{% load i18n %}

{% block title %}{% trans "Settings" %}{% endblock %}

{% block content %}
<form action="/settings" method="post">
<h2>{% trans "User Interface" %}</h2>
<div class="field">
<div class="field-name">{% trans "Language" %}</div>
<select id="language" name="language">
<option>Select</option>
{% for lang in LANGUAGES %}
<option value="{{ lang.0 }}"{% ifequal language lang.0 %} selected="selected"{% endifequal %}>{{ lang.1 }}</option>
{% endfor %}
</select>
</div>

<div class="field">
<div class="field-name">{% trans "Style" %}</div>
<select id="style" name="style">
<option>Select</option>
{% for stl in config.VALID_STYLES %}
<option value="{{ stl.0 }}"{% ifequal style stl.0 %} selected="selected"{% endifequal %}>{{ stl.1 }}{% ifequal stl.0 config.DEFAULT_STYLE %} {% trans "(Default)" %}{% endifequal %}</option>
{% endfor %}
</select>
</div>

<div class="field">
<div class="field-name full">{% trans "Gravatar Options" %}</div>
<div class="field-value">
<select id="gravatar_option" name="gravatar_option">
<option>Select</option>
{% for gra in config.VALID_GRA_OPTIONS %}
<option value="{{ gra.0 }}"{% ifequal gravatar_option gra.0 %} selected="selected"{% endifequal %}>{{ gra.1 }}{% ifequal gra.0 config.DEFAULT_GRAVATAR %} {% trans "(Default)" %}{% endifequal %}</option>
{% endfor %}
</select>
Set the default avatar set or turn off Gravatar.
</div>
</div>

<h2>{% trans "Posting" %}</h2>
<div class="field">
<div class="field-name">{% trans "Name" %}</div>
<div class="field-value">
<input id="name" type="text" name="name" value="{{ name }}" maxlength="{{ config.SECRET_NAME_MAXLENGTH }}"/><br/>
{% trans "Leave empty, all secrets will be posted as <i>Anonymous</i>." %}
</div>
</div>

<div class="field">
<div class="field-name full">{% trans "Gravatar email address <a href='/faq#gravatar' class='info-pin'>&#10033;</a> or Secret ID Text <a href='/faq#secretidtext' class='info-pin'>&#10033;</a>" %}</div>
<div class="field-value">
<input id="gravatar" type="text" name="gravatar" value="{{ gravatar }}"/><br/>
{% trans "If you enter your Gravatar email address, you will need to get the Gravatar Check. <a href='javascript:send_gravatar_check();'>Click here</a> to send the Gravatar Check to your Gravatar email address" %}
</div>
</div>

<div class="field">
<div class="field-name full">{% trans "Gravatar Check" %}</div>
<div class="field-value">
<input id="gravatar_check" type="text" name="gravatar_check" value="{{ gravatar_check }}"/><br/>
{% trans "Leave empty if you do not use Gravatar email address above." %}
</div>
</div>

<div class="field">
<div class="field-value full">
<input type="submit" value="{% trans "Save" %}"/>
</div>
</div>
</form>
{% endblock %}
